//
//  ViewController.m
//  FeatureGuideView
//
//  Created by 郭健 on 2020/8/30.
//  Copyright © 2020 Seacity. All rights reserved.
//

#import "ViewController.h"

#import "SC_FeatureGuideViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    
    [self featureGuideView];
}


#pragma mark - 新功能引导
- (void)featureGuideView {
    BOOL finish = [[NSUserDefaults standardUserDefaults] boolForKey:@"需要新功能引导的版本号"];
    if (!finish) {
        SC_FeatureGuideViewController *vc = [[SC_FeatureGuideViewController alloc]init];
        vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
        vc.modalPresentationStyle = UIModalPresentationCustom;
        vc.markStyle = WTMarkStyleOval;
        vc.msgImageNames = @[@"home_guide_guahao",@"home_guide_daozhen",@"home_guide_hospital",@"home_guide_doctor"];
        vc.guideContentFrames = @[[NSValue valueWithCGRect:CGRectMake(20, 600, 100, 70)],[NSValue valueWithCGRect:CGRectMake(66, 260, 200, 100)],[NSValue valueWithCGRect:CGRectMake(100, 180, 300, 120)],[NSValue valueWithCGRect:CGRectMake(200, 300, 150, 100)]];
        if (vc.markStyle == WTMarkStyleRound) {
            vc.roundRadius = @[@10, @20 , @30 , @40];
        }
        [self presentViewController:vc animated:YES completion:nil];
        
        // 正式开发不需要注释下面两行代码
        // [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"需要新功能引导的版本号"];
        // [[NSUserDefaults standardUserDefaults] synchronize];
    }
}


@end
